home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 2,801 to 2,900
/
aol-file-protocol-4400-2801-to-2900.zip
/
AOLDLs
/
C++ Files Library
/
Point_Rect C++ Classes
/
MacObj.sit
/
MacObj ƒ
/
CRect.h
< prev
next >
Wrap
Text File
|
1993-09-15
|
2KB
|
70 lines
/*
CPoint.h
Interface for the Point Class
*/
#pragma once
//
// If the symbol _MACOBJ_SPEED is defined, the file CPoint.cp is included by this
// header file and all methods are inlined. Otherwise, CPoint.cp must be included
// in your project and all methods are called as subroutines.
//
#define _MACOBJ_SPEED
#include <types.h>
#include <QuickDraw.h>
#include "CPoint.h"
class CRect : public Rect
{
public:
// Constructors
CRect();
CRect(short left, short top, short right, short bottom);
CRect(const Rect& r);
// Member functions
void SetRect(short left, short top, short right, short bottom);
void SetRectEmpty();
void InsetRect(short x, short y);
void OffsetRect(short x, short y);
void OffsetRect(Point p);
Boolean PtInRect(Point p);
Boolean EmptyRect() const;
Boolean NullRect() const;
short Height(void);
short Width(void);
Boolean EqualRect(const Rect& r) const;
CPoint& TopLeft();
CPoint& BottomRight();
void UnionRect(Rect& r1, Rect& r2);
void SectRect(Rect& r1, Rect& r2);
// Quickdraw member functions
void EraseRect();
void FillRect(PatPtr thePat);
void FrameRect();
void InvertRect();
// Operators
void operator=(const Rect& r);
Boolean operator==(const Rect& r) const;
Boolean operator!=(const Rect& r) const;
void operator+=(Point p);
void operator-=(Point p);
void operator|=(const Rect& r);
void operator&=(const Rect& r);
CRect operator+(Point p) const;
CRect operator-(Point p) const;
CRect operator|(const Rect& r) const;
CRect operator&(const Rect& r) const;
};
#ifdef _MACOBJ_SPEED
#include "CRect.cp"
#endif